package com.funtl.my.shop.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import com.futl.my.shop.commons.persistence.BaseEntity;
import com.futl.my.shop.commons.persistence.BaseTreeEntity;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * @author tw
 * @version 1.0
 * @date 2020/5/13 19:33
 */

@Data
public class TbContentCategory extends BaseTreeEntity {
    @Length(min = 1,max = 20,message = "分类名称长度介于1-20个字符")
    private String name;
    private Integer status;
    @NotNull(message = "排序不能为空")
    private Integer sortOrder;
    @JsonProperty(value = "isParent")
    private Boolean isParent;
    private TbContentCategory parent;
}
